home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-12-03 | 1.2 KB | 18 lines | [TEXT/MPS ] |
- This folder contains an example of attaching an MPW 68K library to a POwerPC application.
- The technique involves 4 steps:
- 1) Creating a table of Universal Procedure Pointers, with one pointer per function in
- the library. This table goes inside the PowerPC application, and is exported via the CFM.
- 2) Creating a "wrapper" routine which turns the MPW library into a stand-alone 68K code
- resource. This routine needs to 1) ask the CFM for the location of the table (exported
- from the application), and 2) place 68K pointers to the library routines into the table.
- This routine is called once, when the code resource is loaded.
- 3) Loading and executing the code resource from the PowerPC application. This involves
- using Mixed Mode to call the "wrapoper" routine which builds the table.
- 4) Finally, using Mixed Mode to call through the Univerasl Procedure Pointers which
- were placed into the table.
-
- To build the example, use "BuildProgram MainApp", or select "Build…" from the Build menu
- and specify "MainApp." This will build a 68K library (from Library.c and Library.h), a
- 68K code resource (from Library, WrapperTable.h, and Wrapper.c), and an application which
- contains the code resource.
-